
import {I18Parse,CommonLang} from "@lowcode/jpaas-common-lib";
import appMenuLang from '../../locales/lang/impl/views/appMenuLang.js';
import leftMenuLang from '../../locales/lang/impl/views/leftMenuLang.js';
let lang = appMenuLang;
let leftMenu = leftMenuLang;
let i18n=function (langKey,text) {
    return I18Parse.getI18Val(lang.appMenu,langKey, text)
}

let leftI18n=function (langKey,text) {
    return I18Parse.getI18Val(leftMenu.leftMenu,langKey, text)
}

export const headMenu = [
    {key:'appNav',title: i18n('designGuide','设计向导'),icon:'iconhomepage',type:'routerPath',path:"/appDesign/appHome"},
    {key:'appForm',title:i18n('formMan','单据管理'),icon:'iconicon-test6'},
    {key:'appFlow',title:i18n('processMan','流程管理'),icon:'iconVue3jpaas-icon_liucheng2'},
    {key:'appPage',title:i18n('customPage','自定义页面'),icon:'iconshejifei'},
    {key:'appScreen',title:i18n('largeDesign','大屏设计'),icon:'iconshujudaping',type:'link',path:"/screen"},
    {key:'appConfig',title:i18n('appConfig','应用配置'),icon:'iconintegral1'},
]

/*
* title:菜单名称
* key:菜单key 对应路由 path
* icon:图标
* headMenuKey:所属的头部菜单栏
* */
export const leftMenus = {

    appForm:[
        {title: leftI18n('formDesign','单据设计'), key:'formDesign', icon:'iconchuangjian',headMenuKey:'appForm'},
        {title: leftI18n('formModeling','单据建模'), key:'formModeling', icon:'iconmokuai',headMenuKey:'appForm',
            children:[
                {title:leftI18n('businessEntity','业务实体'), key:'businessEntity', icon:'iconicon-yewushiti',headMenuKey:'appForm'},
                {title:leftI18n('businessModel','业务模型'), key:'businessModel', icon:'iconyewumoxing',headMenuKey:'appForm'},
                {title:leftI18n('formRelation','单据关联约束'), key:'formRelation', icon:'iconguanlian',headMenuKey:'appForm'},

            ]
        },
        {title:leftI18n('formView','单据视图'), key:'formView', icon:'iconactivity',headMenuKey:'appForm',
            children:[
                {title:leftI18n('formPlan','表单方案'), key:'formPlan', icon:'iconicon-test6',headMenuKey:'appForm'},
                {title:leftI18n('formBusinessPlan','业务方案'), key:'formBusinessPlan', icon:'iconcontainer',headMenuKey:'appForm'},
                {title:leftI18n('listDesign','数据列表'), key:'listDesign', icon:'iconcreatetask',headMenuKey:'appForm'},
                {title:leftI18n('dialogBox','对话框'), key:'dialogBox', icon:'iconVue3_feedback',headMenuKey:'appForm'},
                {title:leftI18n('calendarView','日历视图'), key:'calendarView', icon:'iconVue3_date',headMenuKey:'appForm'},
                {title:leftI18n('reportDesign','报表设计'), key:'reportDesign', icon:'iconchart-bar',headMenuKey:'appForm'},
            ]
        },
        {title:leftI18n('dataInteractive','数据交互'), key:'dataInteractive', icon:'iconhourglass',headMenuKey:'appForm',
            children:[
                {title:leftI18n('customQuery','查询定义'), key:'customQuery', icon:'iconyulan',headMenuKey:'appForm'},
                {title:leftI18n('dataDic','数据字典'), key:'dataDic', icon:'iconshujuzidian',headMenuKey:'appForm'},
                {title:leftI18n('systemScript','业务脚本'), key:'systemScript', icon:'iconGroovyjiaoben',headMenuKey:'appForm'},
                {title:leftI18n('webRequest','WEB请求调用'), key:'webRequest', icon:'iconliuzhuan',headMenuKey:'appForm'},
                {title:leftI18n('interfaces','第三方接口'), key:'interfaces', icon:'iconjiekouzhushou',headMenuKey:'appForm'},
                {title:leftI18n('sysSeq','流水号'), key:'sysSeq', icon:'iconliushuihao',headMenuKey:'appForm'},
                {title:leftI18n('tableFormula','表间公式'), key:'tableFormula', icon:'iconhanshuguanli',headMenuKey:'appForm'},
                {title:leftI18n('formTran','单据转换'), key:'formTran', icon:'iconhanshuguanli',headMenuKey:'appForm'},
                {title:leftI18n('dataPermissions','数据权限类型'), key:'dataPermissions', icon:'iconquanxian',headMenuKey:'appForm'},
                {title:leftI18n('dataRoleMapping','数据角色映射'), key:'dataRoleMapping', icon:'iconchart-pointmap',headMenuKey:'appForm'},
                {title:leftI18n('dataDesensitization','数据脱敏'), key:'dataDesensitization', icon:'iconicon-test1',headMenuKey:'appForm'},
                {title:leftI18n('tableRule','字段校验规则'), key:'tableRule', icon:'iconxiaoyanguize',headMenuKey:'appForm'},
                {title:leftI18n('formLiteFlowList','规则引擎管理'), key:'formLiteFlowList', icon:'iconliuchengtu',headMenuKey:'appForm'},
                {title:leftI18n('formLiteComponentList','规则引擎组件'), key:'formLiteComponentList', icon:'iconliuchengtu',headMenuKey:'appForm'},

            ]
        },
    ],
    appFlow:[
        {title:leftI18n('bpmDesign','流程设计'), key:'bpmDesign', icon:'iconVue3jpaas-icon_publish',headMenuKey:'appFlow'},
    ],
    appPage:[

        {title:leftI18n('customPortal','门户设计'), key:'customPortal', icon:'icongongzuotai',headMenuKey:'appPage'},
        {title:leftI18n('portalTool','门户工具'), key:'portalTool', icon:'iconcomputer',headMenuKey:'appPage',
            children:[
                {title:leftI18n('columnCustom','栏目定义'), key:'columnCustom', icon:'icondaohang',headMenuKey:'appPage'},
                {title:leftI18n('msgProject','消息项'), key:'msgProject', icon:'iconmessage',headMenuKey:'appPage'},
                {title:leftI18n('msgBox','消息盒子'), key:'msgBox', icon:'iconinteractive',headMenuKey:'appPage'},
            ]
        },

        {title:leftI18n('pageCustom','页面设计'), key:'pageCustom', icon:'iconshejifei',headMenuKey:'appPage'},

        {title:leftI18n('pageTool','页面工具'), key:'pageTool', icon:'iconworkbench',headMenuKey:'appPage',
            children:[
                {title:leftI18n('chartComponent','图表组件'), key:'chartComponent', icon:'icontubiao',headMenuKey:'appPage'},
                {title:leftI18n('chartDataModel','图表数据模型'), key:'chartDataModel', icon:'iconchart-pie',headMenuKey:'appPage'},
                {title:leftI18n('customColumn','自定义栏目'), key:'customColumn', icon:'iconzidingyibiaodan',headMenuKey:'appPage'},
                {title:leftI18n('customColumnTemplate','自定义栏目模板'), key:'customColumnTemplate', icon:'iconmoban',headMenuKey:'appPage'},
            ]
        },
    ],

    appConfig:[
        {title:leftI18n('appMenu','应用菜单'), key:'appMenu', icon:'iconyingyong',headMenuKey:'appConfig'},

        {
            title:leftI18n('category','分类管理'), key:'category', icon:'iconVue3_manage',headMenuKey:'appConfig',
            children:[
                {title:leftI18n('categoryTree','分类树'), key:'categoryTree', icon:'iconxialashu',headMenuKey:'appConfig'},
                {title:leftI18n('categoryAuth','分类授权'), key:'categoryAuth', icon:'iconquanxian',headMenuKey:'appConfig'}
            ]
        },
        {title:leftI18n('codeGen','代码生成'), key:'codeGen', icon:'icondaima',headMenuKey:'appConfig',
            children: [
                {title:leftI18n('businessCodeGen','业务代码'), key:'businessCodeGen', icon:'iconyewudaima',headMenuKey:'appConfig'},
                {title:leftI18n('emptyProject','空项目代码'), key:'emptyProject', icon:'iconhtml-code-outlined',headMenuKey:'appConfig'}
            ]
        },
        {title:leftI18n('scheduleTask','定时任务管理'), key:'scheduleTask', icon:'iconyingyong',headMenuKey:'appConfig'},
        {title:leftI18n('externalUserMapping','外部用户配置'), key:'formUserMapping', icon:'iconguanlian',headMenuKey:'appConfig'},
    ]
}